
<div class="form">
    <?php $form=$this->beginWidget('BActiveForm', array(
        'id'=>'article-form',
        'enableClientValidation'=>true,
        'enableAjaxValidation'=>true,
        'clientOptions'=>array(
            'validateOnSubmit'=>true,
        ),
        'htmlOptions'=>array(
            'enctype'=>'multipart/form-data',
        )
    )); ?>
    <div class="control-group">
        <label class="control-label"><span class="require">*</span>文章标题：</label>
        <div class="controls">
            <?php echo $form->textField($model, 'article_title'); ?>
            <?php echo $form->error($model,'article_title'); ?>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label"><span class="require">*</span>作者：</label>
        <div class="controls">
            <?php echo $form->textField($model,'article_admin', array('value'=>'肖永标')); ?>　
            <?php echo $form->error($model,'article_admin'); ?>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label"><span class="require">*</span>所属栏目：</label>
        <div class="controls">
        <?php echo $form->dropDownList($model, 'article_nav', $this->getNavList(), array('empty'=>'--选择一个栏目--'));?>
        <?php echo $form->error($model,'article_nav'); ?>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label"><span class="require">*</span>缩略图：</label>
        <div class="controls">
            <?php echo $form->fileField($model, 'article_thumbnail'); ?>　
            <?php echo $form->error($model, 'article_thumbnail'); ?>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label">选择标签：</label>
        <div class="controls">
            <?php echo $form->checkBoxList($model, 'article_tag', $this->getTagsList(),
                                            array('separator'=>'&nbsp;&nbsp;', 'labelOptions'=>array('class'=>'radiolabel')));?>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label"><span class="require">*</span>文章摘要：</label>
        <div class="controls">
            <?php echo $form->textArea($model,'article_summary', array('style'=>'width:450px;height:200px;')); ?>　
            <?php echo $form->error($model,'article_summary'); ?>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label"><span class="require">*</span>内容：</label>
        <div class="controls">
            <?php
            $this->widget('ext.wdueditor.WDueditor',array(
                'model' => $model,
                'attribute' => 'article_content',
                'height' => '400',
                'initVal' => ''
            ));
            ?>
            <?php echo $form->error($model,'article_content'); ?>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label"><span class="require">*</span>是否置顶：</label>
        <div class="controls radios">
            <?php echo
            $form->radioButtonList($model, 'article_is_top',
                array('1'=>'是', '0'=>'否'),
                array('separator'=>'&nbsp;&nbsp;', 'labelOptions'=>array('class'=>'radiolabel')));?>
        </div>
    </div>


    <div class="control-group">
        <div class="controls">
            <input type="submit" value="<?php echo $model->isNewRecord ? '添  加' : '修  改';?>" id="submit" class="btn btn-primary"/>
            <input type="button" value="返  回" onclick="javascript:history.back();" class="btn btn-warning"/>
        </div>
    </div>
    <?php $this->endWidget(); ?>

</div>